#include<bits/stdc++.h>
using namespace std;
#define int long long


bool isPrime(int n) {
	for (int i = 2; i <= sqrt(n); i++) {
		if (n % i == 0)
			return false;
	}
	return true;
}


signed main() {
//	system("start https://www.lanqiao.cn/problems/3902/learning/");

	int n;
	cin >> n;
	n++;
	if (isPrime(n))
		cout << "No";
	else
		cout << "Yes";
	return 0;
}
